package com.attendance.security;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * SpringSecurity 密码编码器配置
 *
 * @author 鵺丶
 * @date 2021/03/12
 */
@Configuration
public class PasswordEncoderConfig {

    /**
     * 密码校验器
     * @return PasswordEncoder
     */
    @Bean
    public PasswordEncoder getPasswordEncoder(){
        return new BCryptPasswordEncoder();
    }
}
